<template>
    <div class="body">
        <div class="box">
            <h1>404</h1>
            <h2>麋鹿也会迷路</h2>
            <el-button type="primary" @click="handleReturn">返回上一页</el-button>
        </div>
    </div>
</template>
<script setup lang="ts" name="404">
import { useRouter } from 'vue-router';
const router = useRouter();
const handleReturn = (() => {
    router.back()
})
</script>
<script lang='ts'>
export default {
    name: 'NotFound'
}
</script>
<style lang='scss' scoped>
.body {
    width: 100%;
    height: 100vh;
    background-color: #F2F2F2;
    position: relative;

    .box {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        text-align: center;
        width: 400px;
        height: 150px;
        background-color: white;
        padding: 40px;
        box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    }

    h1 {
        margin: 0;
        padding: 0;
    }
}
</style>